package com.qf.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author Ypl
 * @version V1.0
 * @Project OctoberAndNovember
 * @Package com.qf.listener
 * @Description:
 * @Date 2022/11/1 17:48
 */
@Component
@RabbitListener(queues = "simple_queue")
public class SimpleListener {
    /**
     * 处理收到的消息
     */
    @RabbitHandler
    public void onMessage(String message){
        System.out.println("消费一条消息：" + message);
    }
}
